package com.sihan.swvp.common;


import java.util.ArrayList;
import java.util.List;

public class Header 
{
	public static final String TYPE_DATE = "date";
	public static final String TYPE_PERCENTAGE = "percentage";
	
	private boolean leaf = false;
	//从上到下所在层级数
	private int tier;
	//从0开始
	private int row;
	private int col;
	//从1开始
	private int rowSpan;
	private int colSpan;
	private String text;
	//数据显示方式:right , left ,center
	private String viewPosition;
	//数据类型 date：日期  percentage百分比
	private String dataType;
	//数字保留精度
	private Integer precision;
	private String dataIndex;
	private List<Header> subHeader = new ArrayList<Header>();
	
	public void addSubHeader(Header header)
	{
		this.getSubHeader().add(header);
	}
	
	public int getRow() {
		return row;
	}
	public void setRow(int row) {
		this.row = row;
	}
	public int getCol() {
		return col;
	}
	public void setCol(int col) {
		this.col = col;
	}
	public int getRowSpan() {
		return rowSpan;
	}
	public void setRowSpan(int rowSpan) {
		this.rowSpan = rowSpan;
	}
	public int getColSpan() {
		return colSpan;
	}
	public void setColSpan(int colSpan) {
		this.colSpan = colSpan;
	}
	public String getText() {
		return text;
	}
	public void setText(String text) {
		this.text = text;
	}
	public String getDataIndex() {
		return dataIndex;
	}
	public void setDataIndex(String dataIndex) {
		this.dataIndex = dataIndex;
	}
	public boolean isLeaf() {
		return leaf;
	}
	public void setLeaf(boolean leaf) {
		this.leaf = leaf;
	}
	public List<Header> getSubHeader() {
		return subHeader;
	}

	public int getTier() {
		return tier;
	}

	public void setTier(int tier) {
		this.tier = tier;
	}

	public String getViewPosition() {
		return viewPosition;
	}

	public void setViewPosition(String viewPosition) {
		this.viewPosition = viewPosition;
	}

	public String getDataType() {
		return dataType;
	}

	public void setDataType(String dataType) {
		this.dataType = dataType;
	}

	public Integer getPrecision() {
		return precision;
	}

	public void setPrecision(Integer precision) {
		this.precision = precision;
	}
}
